<?php
	// SimNet is a Second Life(tm) sim mangement tool that was designed for Fermi Sandbox
    // Copyright (C) 2011 Arthur Fermi
	// 
    // This program is free software: you can redistribute it and/or modify
    // it under the terms of the GNU General Public License as published by
    // the Free Software Foundation, either version 3 of the License.
	// 
    // This program is distributed in the hope that it will be useful,
    // but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    // GNU General Public License for more details.
	//
	// To receive a copy of this license please visit http://www.gnu.org/licenses/

	// You should not need to edit anything below this line.
	// Get Datbase Settings
	include 'simnet_dbconfig.php';
	
	$con = mysql_connect($Server, $UserName, $Password) or die("Could not connect to the server.  Error: " . mysql_error());
	mysql_select_db($database, $con) or die("Could not connect to the database.  Error: " . mysql_error());
	
	$sql="Create TABLE if not exists tblSimNet_Events 
		(
		tblEvent_ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
		tblEvent_Time DATETIME,
		tblEvent_Sim VARCHAR(100),
		tblEvent_Staff VARCHAR(100),
		tblEvent_Type VARCHAR(25),
		tblEvent_Who VARCHAR(100),
		tblEvent_WhoKey VARCHAR(36),
		tblEvent_BanLen VARCHAR(10),
		tblEvent_Reason VARCHAR(50),
		tblEvent_Comment TEXT
		)";
	
	// Run Query
	mysql_query($sql,$con) or die ("Error<br>" . mysql_error());

	mysql_close($con);
	echo "SimNet Database Created";
?>